/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package domain;

import java.util.HashSet;
import java.util.Set;

/**
 *
 * @author David
 */
public class UnitTypeMapper {
    
    public static UnitTypeDTO getUnitTypeDTO(UnitType type){
        UnitTypeDTO dto = new UnitTypeDTO();
        dto.setName(type.name());
        
        return dto;
    }
    
    public static Set<UnitTypeDTO> getUnitTypeDTOList(){
        Set<UnitTypeDTO> unitTypeList = new HashSet<UnitTypeDTO>();
        
        for(UnitType type : UnitType.values()){
            unitTypeList.add(getUnitTypeDTO(type));
        }
        
        return unitTypeList;
    }
    
}
